package com.building18.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.building18.handler.converter.HouseConverter;
import com.github.xiaoymin.knife4j.annotations.Ignore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class House {
    @ExcelProperty("房屋ID")
    private Integer id;
    @ExcelProperty("房号")
    private String houseNo;
    @ExcelProperty("楼层")
    private Integer floor;
    @ExcelProperty("面积")
    private Double area;
    @ExcelProperty("居住时间")
    private LocalDate liveTime;
    @ExcelProperty("房屋状态")
    private Integer state;
    @ExcelProperty("楼宇ID")
    @ExcelIgnore
    private Integer buildingId;
    @ExcelProperty("备注")
    private String remarks;

    //关联属性
    @ExcelProperty(converter = HouseConverter.class, value = "楼栋")
    private Building building;
    @ExcelProperty(converter = HouseConverter.class, value = "业主")
    private Owner owner;
}
